<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MdiWin Demo - edit</title>
    <uieip type="file" value="inc" src="/yqwin/easyui/include.txt" cache="true" minute="1440"></uieip>
    <uieip type="file" value="css" src="/yqwin/css/yqwin.min" cache="false"></uieip>
    <uieip type="file" value="js" src="/yqwin/data/yqwin.min" cache="false"></uieip>
</head>

<body>
    <h2>yqDialog</h2>
    <a id="btn_show" href="#" class="easyui-linkbutton" data-options="" onclick="javascript:show()">show</a>
    <script>
        function show() {
            var $pp = $("#btn_show");
            var prevent_e = $.getPreventDefault($pp[0]);
            var mdiinfo = $.yqGetWindParams();
            var _pops = {
                prevent_e: prevent_e,
                mdiinfo: mdiinfo,
                title: "测试",
                width: 600,
                height: 400,
                buttons: [{
                    text: "确定",
                    iconCls: 'icon-ok',
                    onClick: function ($body) {
                        this.dialog("close");
                    }
                }],
                onOpen: function ($body) {
                    var $select = $('<select  class="select_order" style="width:100%;height:28px;"></select>');
                    $body.append($select);

                    if (window.top != window.self) {
                        $select = window.top.$("#" + $body.attr("id")).find(".select_order");
                    }

                    $select.combobox({
                        valueField: 'id',
                        textField: 'text',
                        data: [{
                            "id": -1,
                            "text": "--请选择--",
                            "selected": true
                        }, {
                            "id": 1,
                            "text": "是"
                        }, {
                            "id": 0,
                            "text": "否"
                        }],
                        editable: false,
                        panelHeight: 'auto',
                        panelMaxHeight: 154
                    });
                }
            };

            if (window.top == window.self) {
                $.yqDialog(_pops);
            }
            else {
                window.top.$.yqDialog(_pops);
            }
        }
    </script>
</body>

</html>